<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人信息</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/editUser.css">
</head>

<body>
<div class="detail">
    <a href="javascript:window.history.back();">
        <div class="arrow">
        </div>
    </a>
    <div class="w">
        <div class="border">
            <img src="${pageContext.request.contextPath}/static/images/logo.png" alt="">
            <h2>个人信息</h2>
        </div>
        <div class="main">
            <form action="${pageContext.request.contextPath}/user/editUser" method="post" enctype="multipart/form-data">
                <ul>
                    <li>
                        <label for="email">邮箱：</label><input type="text" id="email" class="one" name="email"
                                                             placeholder="用户邮箱" value="${user.email}" readonly>
                    </li>
                    <li>
                        <label for="name">用户名：</label><input type="text" id="name" class="two" name="userName"
                                                             placeholder="用户名" value="${user.userName}">
                    </li>
                    <li>
                        <label>用户权限：</label>
                        <select class="menu" name="authority" onselect="${user.authority}">
                            <c:if test="${user.authority == 'general'}">selected</c:if>
                            <option value="general"
                                    <c:if test="${user.authority == 'general'}">selected</c:if> >普通用户
                            </option>
                            <option value="admin"
                                    <c:if test="${user.authority == 'admin'}">selected</c:if> >管理员
                            </option>
                        </select>
                    </li>
                    <li>
                    <li><label for="number">手机号：</label><input type="text" id="number" class="three" name="telephone"
                                                               placeholder="手机号" value="${user.telephone}">
                    <li>
                        <label for="mima">密码：</label><input type="password" name="password" id="mima" class="four"
                                                            placeholder="密码" value="${user.password}">
                    </li>
                    <li class="signup">
                        <input type="hidden" name="profilePath" value="${user.profilePath}">
                        <input type="submit" value="保存">
                    </li>
                    <li>
                        <img class="instruction-pic" id="instruction-pic" src="${user.profilePath}" alt="">
                        <div class="fileinp">
                            <div class="upload">修改头像</div>
                            <input type="file" id="file-up" class="file-up" name="file"
                                   accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
                        </div>
                    </li>
                </ul>
            </form>
        </div>
    </div>
</div>
</body>


</html>
